<?php

/**
 * garantia form base class.
 *
 * @package    gescell
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BasegarantiaForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                  => new sfWidgetFormInputHidden(),
      'modelosxingresos_id' => new sfWidgetFormPropelChoice(array('model' => 'modelosxingresos', 'add_empty' => true)),
      'imei'                => new sfWidgetFormInput(),
      'reparacion1'         => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
      'volvio_a_reparar'    => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
      'registrado_por'      => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
      'fecha_reparacion1'   => new sfWidgetFormDateTime(),
      'fecha_ingreso'       => new sfWidgetFormDateTime(),
      'fecha_garantia'      => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                  => new sfValidatorPropelChoice(array('model' => 'garantia', 'column' => 'id', 'required' => false)),
      'modelosxingresos_id' => new sfValidatorPropelChoice(array('model' => 'modelosxingresos', 'column' => 'id', 'required' => false)),
      'imei'                => new sfValidatorString(array('max_length' => 15)),
      'reparacion1'         => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)),
      'volvio_a_reparar'    => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)),
      'registrado_por'      => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)),
      'fecha_reparacion1'   => new sfValidatorDateTime(array('required' => false)),
      'fecha_ingreso'       => new sfValidatorDateTime(array('required' => false)),
      'fecha_garantia'      => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('garantia[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'garantia';
  }


}
